<?php
use Admin\Model\DzpostModel;
//dz发帖
$last=file_get_contents('task_post.txt');
$now=date('Ymd');
if ($now>$last) {
	file_put_contents('task_post.txt',$now);//存入当前时间，锁定下次操作
	$poster=new DzpostModel();
	$poster->index(3000, 'share', '87');//发布3000个视频资源;
	sleep(2);
	$poster->index(1000, 'share', '88');//发布1000个音频资源;
	sleep(2);
	$poster->index(100, 'share', '97');//发布100个网盘达人;
	sleep(2);
	$poster->index(100, 'share', '93');//发布100个安卓资源;
	sleep(2);
	$poster->index(100, 'share', '89');//发布100个PC软件资源;
	sleep(2);
	$poster->index(100, 'share', '96');//发布100个iOS软件资源;
	sleep(2);
	$five=$now%5;
	//发帖顺序
	switch ($five) {
		case 4:
			$poster->index(100, 'share', '91');sleep(2);//发布100个种子资源;
			$poster->index(5000, 'share', '90');sleep(2);//发布5000个压缩资源;
			$poster->index(1000, 'share', '92');sleep(2);//发布1000个电子书资源;
			$poster->index(100, 'album', '95');sleep(2);//发布100个网盘专辑资源;
			$poster->index(100, 'share', '94');//发布100个文件集资源;
			break;
		case 3:
			$poster->index(5000, 'share', '90');sleep(2);//发布5000个压缩资源;
			$poster->index(1000, 'share', '92');sleep(2);//发布1000个电子书资源;
			$poster->index(100, 'album', '95');sleep(2);//发布100个网盘专辑资源;
			$poster->index(100, 'share', '94');sleep(2);//发布100个文件集资源;
			$poster->index(100, 'share', '91');//发布100个种子资源;
			break;
		case 2:
			$poster->index(1000, 'share', '92');sleep(2);//发布1000个电子书资源;
			$poster->index(100, 'album', '95');sleep(2);//发布100个网盘专辑资源;
			$poster->index(100, 'share', '94');sleep(2);//发布100个文件集资源;
			$poster->index(100, 'share', '91');sleep(2);//发布100个种子资源;
			$poster->index(5000, 'share', '90');sleep(2);//发布5000个压缩资源;
			break;
		case 1:
			$poster->index(100, 'album', '95');sleep(2);//发布100个网盘专辑资源;
			$poster->index(100, 'share', '94');sleep(2);//发布100个文件集资源;
			$poster->index(100, 'share', '91');sleep(2);//发布100个种子资源;
			$poster->index(5000, 'share', '90');sleep(2);//发布5000个压缩资源;;
			$poster->index(1000, 'share', '92');sleep(2);//发布1000个电子书资源;
			break;
		default:
			$poster->index(100, 'share', '94');sleep(2);//发布100个文件集资源;
			$poster->index(100, 'share', '91');sleep(2);//发布100个种子资源;
			$poster->index(5000, 'share', '90');sleep(2);//发布5000个压缩资源;
			$poster->index(1000, 'share', '92');sleep(2);//发布1000个电子书资源;
			$poster->index(100, 'album', '95');sleep(2);//发布100个网盘专辑资源;
			break;
	}
			//360云盘发帖
			$poster->postYunpan(40,10,rand(50, 100));//cartoon
			$poster->postYunpan(40,11,rand(50, 100));//music
			$poster->postYunpan(40,100,rand(50, 100));//soft
			$poster->postYunpan(40,99,rand(50, 100));//edu
			$poster->postYunpan(40,12,rand(50, 100));//game
			$poster->postYunpan(40,13,rand(50, 100));//course
			$poster->postYunpan(40,15,rand(50, 100));//book
			$poster->postYunpan(40,14,rand(50, 100));//it
			$poster->postYunpan(40,16,rand(50, 100));//other
			$poster->postYunpan(40,9,rand(50, 100));//video
	
}
